DEFINE SELECT
Syntax:
DEFINE SELECT logical_name
SQL query
END
The DEFINE SELECT command is used to define a long SQL statement that cannot be specified on a single line, or when the same SQL select statement is being used several times in the script. Defining a select statement binds a logical name to the SQL SELECT statement and uses this simple logical name to execute the query later in the script.